/*
 * @Description: 系统配置页面
 * @Author: Rfan
 * @Date: 2022-04-08 14:20:38
 * @LastEditTime: 2023-03-01 20:29:40
 */

import { lazy } from 'react';
import Layout from '@/layout';
import lazyLoad from '../components/lazyLoad';

export const SystemFonds = lazy(
  () => import(/* webpackChunkName: "System" */ '@/view/system/Fonds/FondMain')
);

export const SystemUnits = lazy(
  () => import(/* webpackChunkName: "System" */ '@/view/system/Units/UnitsMain')
);

export const SystemLibrary = lazy(
  () => import(/* webpackChunkName: "System" */ '@/view/system/LIBManage/LIBManageMain')
);

export const SystemArcType = lazy(
  () => import(/* webpackChunkName: "System" */ '@/view/system/ArcType/ArcTypeMain')
);

export const SystemMetadata = lazy(
  () => import(/* webpackChunkName: "System" */ '@/view/system/Metadata/MetadataMain')
);

export const SystemMetadataBusiness = lazy(
  () =>
    import(/* webpackChunkName: "System" */ '@/view/system/MetadataBusiness/MetadataBusinessMain')
);

export const SystemMetadataInherit = lazy(
  () => import(/* webpackChunkName: "System" */ '@/view/system/MetadataInherit/MetadataInheritMain')
);

export const SystemMetadataRely = lazy(
  () => import(/* webpackChunkName: "System" */ '@/view/system/MetadataRely/MetadataRelyMain')
);

export const SystemMetadataAlias = lazy(
  () => import(/* webpackChunkName: "System" */ '@/view/system/MetadataAlias/MetadataAliasMain')
);

export const SystemArchiveClassify = lazy(
  () => import(/* webpackChunkName: "System" */ '@/view/system/ArchiveClassify/ArchiveClassifyMain')
);

export const SystemDictionary = lazy(
  () => import(/* webpackChunkName: "System" */ '@/view/system/Dictionary/DictionaryMain')
);

export const SystemSorting = lazy(
  () => import(/* webpackChunkName: "System" */ '@/view/system/Sorting/SortingMain')
);

export const SystemOpening = lazy(
  () => import(/* webpackChunkName: "System" */ '@/view/system/Opening/OpeningMain')
);

export const SystemArchivalCode = lazy(
  () => import(/* webpackChunkName: "System" */ '@/view/system/ArchivalCode/ArchivalCodeMain')
);

export const SystemAutoIncrease = lazy(
  () => import(/* webpackChunkName: "System" */ '@/view/system/AutoIncrease/AutoIncreaseMain')
);

export const SystemAutoFiling = lazy(
  () => import(/* webpackChunkName: "System" */ '@/view/system/AutoFiling/AutoFilingMain')
);

export const SystemBoxConfig = lazy(
  () => import(/* webpackChunkName: "System" */ '@/view/system/BoxConfig/BoxConfigMain')
);

export const SystemMetadataConfig = lazy(
  () => import(/* webpackChunkName: "System" */ '@/view/system/MetadataConfig/MetadataConfgMain')
);

export const SystemCodeDef = lazy(
  () => import(/* webpackChunkName: "System" */ '@/view/system/CodeDef/CodeDefMain')
);

export const SystemDescDesign = lazy(
  () => import(/* webpackChunkName: "System" */ '@/view/system/DescDesign/DescDesignMain')
);

export const SystemArchivesDetection = lazy(
  () =>
    import(/* webpackChunkName: "System" */ '@/view/system/ArchivesDetection/ArchivesDetectionMain')
);

export const SystemMappingRelation = lazy(
  () => import(/* webpackChunkName: "System" */ '@/view/system/MappingRelation/MappingRelationMain')
);

export const SystemCDVolumeManage = lazy(
  () => import(/* webpackChunkName: "System" */ '@/view/system/CDVolumManage/CDVolumManageMain')
);

export const SystemTemplateManage = lazy(
  () => import(/* webpackChunkName: "System" */ '@/view/system/TemplateManage/TemplateManageMain')
);

export const SystemDetectionTemplate = lazy(
  () =>
    import(/* webpackChunkName: "System" */ '@/view/system/DetectionTemplate/DetectionTemplateMain')
);

const SystemRoutes: any[] = [
  {
    path: '/system',
    element: <Layout />,
    meta: {
      title: '系统配置'
    },
    children: [
      {
        path: 'unit',
        element: lazyLoad(SystemUnits),
        meta: {
          title: '单位管理'
        }
      },
      {
        path: 'fonds',
        element: lazyLoad(SystemFonds),
        meta: {
          title: '全宗管理'
        }
      },
      {
        path: 'library',
        element: lazyLoad(SystemLibrary),
        meta: {
          title: '库管理'
        }
      },
      {
        path: 'arctype',
        element: lazyLoad(SystemArcType),
        meta: {
          title: '档案类型'
        }
      },
      {
        path: 'metadata',
        element: lazyLoad(SystemMetadata),
        meta: {
          title: '元数据配置'
        }
      },
      {
        path: 'metadata-business',
        element: lazyLoad(SystemMetadataBusiness),
        meta: {
          title: '元数据业务配置'
        }
      },
      {
        path: 'metadata-inherit',
        element: lazyLoad(SystemMetadataInherit),
        meta: {
          title: '元数据继承设置'
        }
      },
      {
        path: 'metadata-rely',
        element: lazyLoad(SystemMetadataRely),
        meta: {
          title: '元数据依赖设置'
        }
      },
      {
        path: 'metadata-alias',
        element: lazyLoad(SystemMetadataAlias),
        meta: {
          title: '元数据别名'
        }
      },
      {
        path: 'archive-classify',
        element: lazyLoad(SystemArchiveClassify),
        meta: {
          title: '档案分类'
        }
      },
      {
        path: 'dictionary',
        element: lazyLoad(SystemDictionary),
        meta: {
          title: '字典定义'
        }
      },
      // {
      //   path: 'metadata-config',
      //   element: SystemMap.SystemMetadataConfig,
      //   meta: {
      //     title: '自定义数据录入'
      //   }
      // },
      {
        path: 'sorting',
        element: lazyLoad(SystemSorting),
        meta: {
          title: '显示排列设置'
        }
      },
      {
        path: 'opening',
        element: lazyLoad(SystemOpening),
        meta: {
          title: '开放字段'
        }
      },
      {
        path: 'archival-code',
        element: lazyLoad(SystemArchivalCode),
        meta: {
          title: '档号设置'
        }
      },
      {
        path: 'auto-increase',
        element: lazyLoad(SystemAutoIncrease),
        meta: {
          title: '分组排列设置'
        }
      },
      {
        path: 'auto-filing',
        element: lazyLoad(SystemAutoFiling),
        meta: {
          title: '自动组卷配置'
        }
      },
      {
        path: 'box-config',
        element: lazyLoad(SystemBoxConfig),
        meta: {
          title: '盒规格配置'
        }
      },
      {
        path: 'desc-design',
        element: lazyLoad(SystemDescDesign),
        meta: {
          title: '录入界面设置'
        }
      },
      {
        path: 'archives-detection',
        element: lazyLoad(SystemArchivesDetection),
        meta: {
          title: '检测方案'
        }
      },
      {
        path: 'mapping-relation',
        element: lazyLoad(SystemMappingRelation),
        meta: {
          title: '映射关系配置'
        }
      },
      {
        path: 'cd-volume',
        element: lazyLoad(SystemCDVolumeManage),
        meta: {
          title: '光盘容量管理'
        }
      },
      {
        path: 'template-mgt',
        element: lazyLoad(SystemTemplateManage),
        meta: {
          title: '模板管理'
        }
      },
      {
        path: 'detection-template',
        element: lazyLoad(SystemDetectionTemplate),
        meta: {
          title: '检测模板'
        }
      }
      // {
      //   path: 'code-def',
      //   element: SystemMap.SystemCodeDef,
      //   meta: {
      //     title: '代码定义'
      //   }
      // },
      // {
      //   path: 'bpmn',
      //   element: <Test />,
      //   meta: {
      //     title: 'bpmn'
      //   }
      // }
    ]
  }
];

export default SystemRoutes;
